# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=witchxtool
pkgver=1.1
pkgrel=11
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner'
        'blackarch-exploitation' 'blackarch-fuzzer')
pkgdesc='A perl script that consists of a port scanner, LFI scanner, MD5 bruteforcer, dork SQL injection scanner, fresh proxy scanner, and a dork LFI scanner.'
arch=('any')
url='http://packetstormsecurity.com/files/97465/Witchxtool-Port-LFI-SQL-Scanner-And-MD5-Bruteforcing-Tool-1.1.html'
license=('custom:unknown')
depends=('perl' 'perl-www-mechanize' 'perl-md5' 'perl-data-validate-ip'
         'perl-net-rawip')
source=("https://dl.packetstormsecurity.net/UNIX/scanners/witcxtool-v$pkgver.tar.gz")
sha512sums=('60b8f4df39b3a98c87f973bdc9fb04ac4b8e0ba283604f575e8d9d13cd6c158e5b105919188c12dffb4b07436c036844c95c843cd177b493a086bcae6ff4825f')

prepare() {
  cd "ver$pkgver"

  sed -i '/\/usr\/bin\/perl/d' "$pkgname.pl"
  sed -i '1i\#!/usr/bin/perl' "$pkgname.pl"
}

package() {
  cd "ver$pkgver"

  install -Dm 755 "$pkgname.pl" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.txt
}

